package com.chaipuyu.dao;

import com.chaipuyu.entity.*;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 作者: cc又瘦啦
 * 开发日期: 2021/12/20
 **/
public interface GoodsDao {

    @Select("select * from tb_user where user_name=#{userName} and user_pwd=#{userPwd}")
    User selectUser(User user);

    List<Goods> selectGoods(@Param("pojo") Pojo pojo,@Param("user") User user);

    @Select("select * from tb_brand")
    List<Brand> getBrandList();

    @Select("select * from tb_type")
    List<Type> getTypeList();

    int insert(Goods goods);

    @Select("select * from tb_user where user_name=#{username}")
    User selectByusername(@Param("username") String uname);

    @Select("select * from tb_user where user_name=#{username} and user_pwd=#{upwd}")
    User selectByupwd(@Param("username")String uname,@Param("upwd") String upwd);
}
